package com.mmall.util;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by asus on 2018/3/30.
 */
public class LevelUtil {
    public final static String SEPARATOR = ".";
    public final static String ROOT = "0";

    public static String calculateLevel(String parentLevel,int parentId){
        if(StringUtils.isBlank(parentLevel)){
            return ROOT;
        }
        return StringUtils.join(parentLevel,SEPARATOR,parentId);
    }
}
